//#include <stdlib.h>
//
//#include "Multivector.h"
//#include "Tests.h"
//
//
//using namespace std;
//using namespace mygalib;
//
//#include <GL\glut.h>
//#include <iostream>
//#include <vector>
//
////#include "Point2D.h"
//
//using namespace std;
//
////Point2D vSquare1[] = { Point2D(0.25f,0.25f), Point2D(0.25f,0.75f), Point2D(0.75f,0.25f), Point2D(0.75f,0.75f) };
////Point2D vTriangle[] = { Point2D(0.0,0.0f), Point2D(1.0f,0.0f), Point2D(0.5f,1.0f) };
//float scaleX = 1;
//float scaleY = 1;
//float scaleZ = 1;
//
//float positionX = 0;
//float positionY = 0;
//
//Multivector e0 = Multivector("1");
//Multivector e1 = Multivector("10");
//Multivector e2 = Multivector("100");
//
//Multivector a = 1*e0 + 0.1*e1 + 0*e2;
//Multivector b = 1*e0 + 1*e1 + 1*e2;
//Multivector s = 1*e0 + 0*e1 + 1*e2;
//Multivector p = 1*e0 + 0.2*e1 + 0.5*e2;
//
//void init (void)  
//{ 
//	glClearColor (1.0, 1.0, 1.0, 0.0); 
//	glMatrixMode(GL_PROJECTION); 
//	glLoadIdentity(); 
//	glOrtho(-1, 2, -1, 2, -1.0, 1.0); 
//} 
//
//void drawConic()
//{
//	glColor3f(1.0f,0.0f,0.0f);
//	Multivector m = Multivector();
//	m = 1*e0 + 0*e1 + 0*e2;
//	Multivector q = Multivector();
//	q = 1*e0 + 0*e1 + 0*e2;
//	double delta = (b("100") - a("100"))/(b("10") - a("10"));
//	//cout << delta << endl;
//	glColor3f(1.0f,0.0f,0.0f);
//	glBegin(GL_LINE_STRIP);
//		glVertex2f( a("10"),a("100") ); 
//		glVertex2f( b("10"),b("100") ); 
//		glVertex2f( s("10"),s("100") );
//		glVertex2f( a("10"),a("100") ); 
//	glEnd();
//	glPointSize(8.0f);
//	glColor3f(0.0f,0.0f,0.0f);
//	glBegin( GL_POINTS ); 
//		glVertex2f( a("10"),a("100") ); 
//		glVertex2f( b("10"),b("100") ); 
//		glVertex2f( s("10"),s("100") );
//		glVertex2f( p("10"),p("100") );
//	glEnd();
//	//int n = 3;
//	glPointSize(5.0f);
//	glColor3f(0.0f,0.0f,0.0f);
//	glBegin(GL_LINE_STRIP);
//	Multivector I = e0^e1^e2;
//		for (double i = -20; i < 20; i = i + 0.05)
//		{
//			m = 1*e0 + i*e1 + (i*delta)*e2;
//			//glColor3f(0.0f,0.0f,1.0f);
//			//glVertex2f( m("10"),m("100") ); 
//			q = (b ^ ((a^p).rp((m^s),I))).rp(
//				(a^((b^p).rp((m^s),I))),I);
//			q = q/q("1");
//			//glColor3f(1.0f,0.0f,0.0f);
//			glVertex2f( q("10"),q("100") ); 
//				
//		}
//	glEnd(); 
//}
//
//void display ( void ) 
//{ 
//	
//	glClear( GL_COLOR_BUFFER_BIT ); 
//	drawConic();
//
//	glutSwapBuffers(); 
//} 
//
//void keyboard (unsigned char key, int x, int y) {
//	if (key == 'a') {
//		p("10") = p("10") - .1;
//	}
//	if (key == 'd') {
//		p("10") = p("10") + .1;
//	}
//	if (key == 'w') {
//		p("100") = p("100") + .1;
//	}
//	if (key == 's') {
//		p("100") = p("100") - .1;
//	}
//	display();
//}
//int main(int argc, char** argv) 
//{ 
//	glutInit(&argc, argv); 
//	glutInitDisplayMode (GLUT_DOUBLE | GLUT_RGB); 
//	glutInitWindowSize (800, 600);  
//	glutInitWindowPosition (100, 100); 
//	glutCreateWindow ("Conic"); 
//	init (); 
//	glutKeyboardFunc (keyboard); //check the keyboard
//	glutDisplayFunc(display);
//	glutMainLoop(); 
//
//	return 0; 
//}
//
